package com.zhuangjie.mvc.validator.annotate;

import com.zhuangjie.mvc.validator.handler.ContainsValidator;

import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.*;

/**
 * 必须包含指定字符-JSR303注解
 */
@Documented
@Constraint(validatedBy = ContainsValidator.class)
@Target( { ElementType.METHOD, ElementType.FIELD })
@Retention(RetentionPolicy.RUNTIME)
public @interface Contains {
    String message() default "Must contain specified character";
    Class<?>[] groups() default {};
    Class<? extends Payload>[] payload() default {};
    String value() default "";
}